#include <iostream>
using namespace std;

int gcd(int m, int n) {
	if (m < n ) {
		int tmp = n;
		n = m;
		m = tmp;
	}
	if (!n) return m;
	return gcd(n, m%n);
}

int main(int argc, char* argv[])
{
	int m, n;
	while (cin>>m>>n) {
		if (n == 0 || m == 0) return 1;
        cout<<m*n/gcd(m, n)<<endl;
	}
}
